<template>
  <div>
    <el-form-item label="提示文字">
      <el-input size="default" v-model="modelValue.placeholder" placeholder="请设置提示语"/>
    </el-form-item>
    <el-form-item label="是否多选">
      <el-switch v-model="modelValue.multiple"></el-switch>
    </el-form-item>
  </div>
</template>

<script>
import { toRefs } from 'vue'
export default {
    name: 'UserPickerConfig',
    props: {
        modelValue: {
            type: Object,
            default: () => {
                return {}
            },
        },
    },
    setup(props) {
        const { modelValue } = toRefs(props)
        const selected = (select) => {
            modelValue.value.options.length = 0
            select.forEach((val) => modelValue.value.options.push(val))
        }
        return {
            selected
        }
    }
}
</script>

<style>

</style>